<script>
    $(".form_validate").validate();
</script>
<?php echo $this->Form->create("User", array('class' => 'form_validate', 'enctype' => 'multipart/form-data', 'type' => 'file', "action" => "upload_file/" . $user_id . "/" . $tipo)); ?>
<legend>Adjuntar archivo</legend>

<?php
echo $this->Form->hidden('User.id', array('type' => 'text', 'value' => $user_id));
echo $this->Form->file('User.archivo', array('label' => 'Archivo adjunto', 'accept' => 'pdf'));
?>
<?php echo $this->Form->end(array('label' => 'Guardar')) ?>
<br><br>
<?php
echo $this->Ajax->link($this->Html->image("regresar.gif", array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar')), array('controller' => "Users", "action" => "view", $user_id), array('update' => 'content', 'indicator' => 'loading', 'escape' => false), null)
?>